Title: SC-Vue
Author: Patrick Lai
Published: <strong>2020 年 5 月 16 日</strong>
Last modified: 2021 年 6 月 4 日

---

搜索插件

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://s.w.org/plugins/geopattern-icon/sc-vue.svg)

# SC-Vue

 作者：[Patrick Lai](https://profiles.wordpress.org/scoop082110/)

[下载](https://downloads.wordpress.org/plugin/sc-vue.1.0.1.zip)

 * [详情](https://cn.wordpress.org/plugins/sc-vue/#description)
 * [评价](https://cn.wordpress.org/plugins/sc-vue/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/sc-vue/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/sc-vue/#developers)

 [支持](https://wordpress.org/support/plugin/sc-vue/)

## 描述

SC-Vue provides a shortcode to inject [Vue.js](https://vuejs.org/) apps
 into WordPress
pages and posts. For example, the following shortcode would inject the ‘demo_posts’
app:

    ```
      [pl2010_vue app="demo_posts"/]
    ```

An app is made up of two files, index.js and index.html. They reside
 in a subdirectory
bearing the app’s name under the ‘apps’ directory in the plugin. For the ‘demo_posts’
app, that means:

 * _WP\_PLUGIN\_DIR_/sc-vue/apps/demo_posts/index.js
 * _WP\_PLUGIN\_DIR_/sc-vue/apps/demo_posts/index.html

The index.js Javascript file sets up an initialization function for
 creating a 
Vue model. That model controls a <div> DOM element that SC-Vue renders; the content
of that <div> comes from index.html.

See apps/demo_01 and apps/demo_02 for simple examples of index.js
 and index.html.
For a more complex and realistic example that uses [webpack.js](https://webpack.js.org/)
to packs Javascript and styles into a single index.js, see apps/demo_posts. Additional
details may be found in the documentation of the shortcode function in init.php.

## 安装

 1. Upload the plugin files to the ‘_WP\_PLUGIN\_DIR_/sc-vue’
     directory, or install
    the plugin through the ‘Plugin’s screen in WordPress.
 2. Activate the plugin.
 3. Install any additional Vue app in ‘_WP\_PLUGIN\_DIR_/sc-vue/apps’.
     Note that app
    name must be simple identifier that begins with a letter followed by any number
    of digits, letters, and the underscore.
 4. Startg using shortcode `[pl2010_vue app="..."/]`!

## 常见问题

### Does this work with WordPress version X?

This plugin is developed on WordPress 5.4. It has not been tried on any
 other version.

### Does this work with PHP 5.x?

This plugin is developed with PHP 7.x. Backporting to PHP 5.x
 should not be difficult
however.

## 评价

![](https://secure.gravatar.com/avatar/54811961d3b23e8ab6c0dae58cd00ce1b7eaddb534ab5017dcea4f8577d0052e?
s=60&d=retro&r=g)

### 󠀁[Hey thanks, for uploading this plugin.](https://wordpress.org/support/topic/hey-thanks-for-uploading-this-plugin/)󠁿

 [apesyntax](https://profiles.wordpress.org/apesyntax/) 2021 年 9 月 10 日

I have a question, how can we reference a file from the js folder into our index.
js file? I want to test some things but I am having this small issue, like how should
I type the location for the folder, example: import {fullnames} from ‘./importingVarTest.
js’; I still haven’t got the hierarchy, it would be great if is possible, if not
do I just have to use the index.js file for all the js?

 [ 阅读所有1条评价 ](https://wordpress.org/support/plugin/sc-vue/reviews/)

## 贡献者及开发者

「SC-Vue」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ Patrick Lai ](https://profiles.wordpress.org/scoop082110/)

[帮助将「SC-Vue」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/sc-vue)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/sc-vue/)，查看[SVN仓库](https://plugins.svn.wordpress.org/sc-vue/)，
或通过[RSS](https://plugins.trac.wordpress.org/log/sc-vue/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/sc-vue/)。

## 更新日志

#### 1.0

 * First version published.

## 额外信息

 *  版本 **1.0**
 *  最后更新：**5 年前**
 *  活跃安装数量 **30+**
 *  WordPress 版本 ** 5.4 或更高版本 **
 *  已测试的最高版本为 **5.7.15**
 *  PHP 版本 ** 7.0 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/sc-vue/)
 * 标签
 * [vue](https://cn.wordpress.org/plugins/tags/vue/)
 *  [高级视图](https://cn.wordpress.org/plugins/sc-vue/advanced/)

## 评级

 5 星（最高 5 星）。

 *  [  1 条 5 星评价     ](https://wordpress.org/support/plugin/sc-vue/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/sc-vue/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/sc-vue/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/sc-vue/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/sc-vue/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/sc-vue/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/sc-vue/reviews/)

## 贡献者

 *   [ Patrick Lai ](https://profiles.wordpress.org/scoop082110/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/sc-vue/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](https://www.paypal.me/scoop082110)