mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
1 line
13 KiB
JavaScript
1 line
13 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[56],{234:function(s,a,E){"use strict";E.r(a);var C={created:function(){this.content=unescape("%3Ch2%3E%u98CE%u683C%u6307%u5357%3C/h2%3E%0A%3Cp%3E%u5728%u53C2%u4E0E%20Vant%20%u5F00%u53D1%u65F6%uFF0C%u8BF7%u9075%u5B88%u7EA6%u5B9A%u7684%u5355%u6587%u4EF6%u7EC4%u4EF6%u98CE%u683C%u6307%u5357%uFF0C%u6307%u5357%u5185%u5BB9%u8282%u9009%u81EA%20%3Ca%20href%3D%22https%3A//cn.vuejs.org/v2/style-guide%22%3EVue%20%u5B98%u65B9%u98CE%u683C%u6307%u5357%3C/a%3E%3C/p%3E%0A%3Ch3%3E%u7EC4%u4EF6%u6570%u636E%3C/h3%3E%0A%3Cp%3E%u7EC4%u4EF6%u7684%20data%20%u5FC5%u987B%u662F%u4E00%u4E2A%u51FD%u6570%u3002%3C/p%3E%0A%3Cpre%3E%3Ccode%20class%3D%22language-js%22%3E%3Cspan%20class%3D%22hljs-comment%22%3E//%20bad%3C/span%3E%0A%3Cspan%20class%3D%22hljs-keyword%22%3Eexport%3C/span%3E%20%3Cspan%20class%3D%22hljs-keyword%22%3Edefault%3C/span%3E%20%7B%0A%20%20%3Cspan%20class%3D%22hljs-attr%22%3Edata%3C/span%3E%3A%20%7B%0A%20%20%20%20%3Cspan%20class%3D%22hljs-attr%22%3Efoo%3C/span%3E%3A%20%3Cspan%20class%3D%22hljs-string%22%3E%27bar%27%3C/span%3E%0A%20%20%7D%0A%7D%0A%0A%3Cspan%20class%3D%22hljs-comment%22%3E//%20good%3C/span%3E%0A%3Cspan%20class%3D%22hljs-keyword%22%3Eexport%3C/span%3E%20%3Cspan%20class%3D%22hljs-keyword%22%3Edefault%3C/span%3E%20%7B%0A%20%20data%20%28%29%20%7B%0A%20%20%20%20%3Cspan%20class%3D%22hljs-keyword%22%3Ereturn%3C/span%3E%20%7B%0A%20%20%20%20%20%20%3Cspan%20class%3D%22hljs-attr%22%3Efoo%3C/span%3E%3A%20%3Cspan%20class%3D%22hljs-string%22%3E%27bar%27%3C/span%3E%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D%0A%3C/code%3E%3C/pre%3E%0A%3Ch3%3E%u5355%u6587%u4EF6%u7EC4%u4EF6%u6587%u4EF6%u540D%u79F0%3C/h3%3E%0A%3Cp%3E%u5355%u6587%u4EF6%u7EC4%u4EF6%u7684%u6587%u4EF6%u540D%u5E94%u8BE5%u8981%u4E48%u59CB%u7EC8%u662F%u5355%u8BCD%u5927%u5199%u5F00%u5934%20%28PascalCase%29%uFF0C%u8981%u4E48%u59CB%u7EC8%u662F%u6A2A%u7EBF%u8FDE%u63A5%20%28kebab-case%29%u3002%3C/p%3E%0A%3Cpre%3E%3Ccode%3E//%20bad%0Amycomponent.vue%0AmyComponent.vue%0A%0A//%20good%0Amy-component.vue%0AMyComponent.vue%0A%3C/code%3E%3C/pre%3E%0A%3Ch3%3E%u7D27%u5BC6%u8026%u5408%u7684%u7EC4%u4EF6%u540D%3C/h3%3E%0A%3Cp%3E%u548C%u7236%u7EC4%u4EF6%u7D27%u5BC6%u8026%u5408%u7684%u5B50%u7EC4%u4EF6%u5E94%u8BE5%u4EE5%u7236%u7EC4%u4EF6%u540D%u4F5C%u4E3A%u524D%u7F00%u547D%u540D%u3002%3C/p%3E%0A%3Cpre%3E%3Ccode%3E//%20bad%0Acomponents/%0A%7C-%20TodoList.vue%0A%7C-%20TodoItem.vue%0A%u2514%u2500%20TodoButton.vue%0A%0A//%20good%0Acomponents/%0A%7C-%20TodoList.vue%0A%7C-%20TodoListItem.vue%0A%u2514%u2500%20TodoListItemButton.vue%0A%3C/code%3E%3C/pre%3E%0A%3Ch3%3E%u81EA%u95ED%u5408%u7EC4%u4EF6%3C/h3%3E%0A%3Cp%3E%u5728%u5355%u6587%u4EF6%u7EC4%u4EF6%u4E2D%u6CA1%u6709%u5185%u5BB9%u7684%u7EC4%u4EF6%u5E94%u8BE5%u662F%u81EA%u95ED%u5408%u7684%u3002%3C/p%3E%0A%3Cpre%3E%3Ccode%20class%3D%22language-html%22%3E%3Cspan%20class%3D%22hljs-comment%22%3E%26lt%3B%21--%20bad%20--%26gt%3B%3C/span%3E%0A%3Cspan%20class%3D%22hljs-tag%22%3E%26lt%3B%3Cspan%20class%3D%22hljs-name%22%3Emy-component%3C/span%3E%26gt%3B%3C/span%3E%3Cspan%20class%3D%22hljs-tag%22%3E%26lt%3B/%3Cspan%20class%3D%22hljs-name%22%3Emy-component%3C/span%3E%26gt%3B%3C/span%3E%0A%0A%3Cspan%20class%3D%22hljs-comment%22%3E%26lt%3B%21--%20good%20--%26gt%3B%3C/span%3E%0A%3Cspan%20class%3D%22hljs-tag%22%3E%26lt%3B%3Cspan%20class%3D%22hljs-name%22%3Emy-component%3C/span%3E%20/%26gt%3B%3C/span%3E%0A%3C/code%3E%3C/pre%3E%0A%3Ch3%3EProp%20%u540D%u5927%u5C0F%u5199%3C/h3%3E%0A%3Cp%3E%u5728%u58F0%u660E%20prop%20%u7684%u65F6%u5019%uFF0C%u5176%u547D%u540D%u5E94%u8BE5%u59CB%u7EC8%u4F7F%u7528%20camelCase%uFF0C%u800C%u5728%u6A21%u677F%u4E2D%u5E94%u8BE5%u59CB%u7EC8%u4F7F%u7528%20kebab-case%u3002%3C/p%3E%0A%3Cpre%3E%3Ccode%20class%3D%22language-js%22%3E%3Cspan%20class%3D%22hljs-comment%22%3E//%20bad%3C/span%3E%0A%3Cspan%20class%3D%22hljs-keyword%22%3Eexport%3C/span%3E%20%3Cspan%20class%3D%22hljs-keyword%22%3Edefault%3C/span%3E%20%7B%0A%20%20%3Cspan%20class%3D%22hljs-attr%22%3Eprops%3C/span%3E%3A%20%7B%0A%20%20%20%20%3Cspan%20class%3D%22hljs-string%22%3E%27greeting-text%27%3C/span%3E%3A%20%3Cspan%20class%3D%22hljs-built_in%22%3EString%3C/span%3E%0A%20%20%7D%0A%7D%3B%0A%0A%3Cspan%20class%3D%22hljs-comment%22%3E//%20good%3C/span%3E%0A%3Cspan%20class%3D%22hljs-keyword%22%3Eexport%3C/span%3E%20%3Cspan%20class%3D%22hljs-keyword%22%3Edefault%3C/span%3E%20%7B%0A%20%20%3Cspan%20class%3D%22hljs-attr%22%3Eprops%3C/span%3E%3A%20%7B%0A%20%20%20%20%3Cspan%20class%3D%22hljs-attr%22%3EgreetingText%3C/span%3E%3A%20%3Cspan%20class%3D%22hljs-built_in%22%3EString%3C/span%3E%0A%20%20%7D%0A%7D%0A%3C/code%3E%3C/pre%3E%0A%3Cpre%3E%3Ccode%20class%3D%22language-html%22%3E%3Cspan%20class%3D%22hljs-comment%22%3E%26lt%3B%21--%20bad%20--%26gt%3B%3C/span%3E%0A%3Cspan%20class%3D%22hljs-tag%22%3E%26lt%3B%3Cspan%20class%3D%22hljs-name%22%3Ewelcome-message%3C/span%3E%20%3Cspan%20class%3D%22hljs-attr%22%3EgreetingText%3C/span%3E%3D%3Cspan%20class%3D%22hljs-string%22%3E%22hi%22%3C/span%3E%20/%26gt%3B%3C/span%3E%0A%0A%3Cspan%20class%3D%22hljs-comment%22%3E%26lt%3B%21--%20good%20--%26gt%3B%3C/span%3E%0A%3Cspan%20class%3D%22hljs-tag%22%3E%26lt%3B%3Cspan%20class%3D%22hljs-name%22%3Ewelcome-message%3C/span%3E%20%3Cspan%20class%3D%22hljs-attr%22%3Egreeting-text%3C/span%3E%3D%3Cspan%20class%3D%22hljs-string%22%3E%22hi%22%3C/span%3E%20/%26gt%3B%3C/span%3E%0A%3C/code%3E%3C/pre%3E%0A%3Ch3%3EProps%20%u6362%u884C%3C/h3%3E%0A%3Cp%3E%u591A%u4E2A%20Props%20%u7684%u5143%u7D20%u5E94%u8BE5%u5206%u591A%u884C%u64B0%u5199%uFF0C%u6BCF%u4E2A%20Props%20%u4E00%u884C%uFF0C%u95ED%u5408%u6807%u7B7E%u5355%u8D77%u4E00%u884C%u3002%3C/p%3E%0A%3Cpre%3E%3Ccode%20class%3D%22language-html%22%3E%3Cspan%20class%3D%22hljs-comment%22%3E%26lt%3B%21--%20bad%20--%26gt%3B%3C/span%3E%0A%3Cspan%20class%3D%22hljs-tag%22%3E%26lt%3B%3Cspan%20class%3D%22hljs-name%22%3Emy-component%3C/span%3E%20%3Cspan%20class%3D%22hljs-attr%22%3Efoo%3C/span%3E%3D%3Cspan%20class%3D%22hljs-string%22%3E%22a%22%3C/span%3E%20%3Cspan%20class%3D%22hljs-attr%22%3Ebar%3C/span%3E%3D%3Cspan%20class%3D%22hljs-string%22%3E%22b%22%3C/span%3E%20%3Cspan%20class%3D%22hljs-attr%22%3Ebaz%3C/span%3E%3D%3Cspan%20class%3D%22hljs-string%22%3E%22c%22%3C/span%3E%20/%26gt%3B%3C/span%3E%0A%0A%3Cspan%20class%3D%22hljs-comment%22%3E%26lt%3B%21--%20good%20--%26gt%3B%3C/span%3E%0A%3Cspan%20class%3D%22hljs-tag%22%3E%26lt%3B%3Cspan%20class%3D%22hljs-name%22%3Emy-component%3C/span%3E%0A%20%20%3Cspan%20class%3D%22hljs-attr%22%3Efoo%3C/span%3E%3D%3Cspan%20class%3D%22hljs-string%22%3E%22a%22%3C/span%3E%0A%20%20%3Cspan%20class%3D%22hljs-attr%22%3Ebar%3C/span%3E%3D%3Cspan%20class%3D%22hljs-string%22%3E%22b%22%3C/span%3E%0A%20%20%3Cspan%20class%3D%22hljs-attr%22%3Ebaz%3C/span%3E%3D%3Cspan%20class%3D%22hljs-string%22%3E%22c%22%3C/span%3E%0A/%26gt%3B%3C/span%3E%0A%3C/code%3E%3C/pre%3E%0A%3Ch3%3E%u6307%u4EE4%u7F29%u5199%3C/h3%3E%0A%3Cp%3E%u6307%u4EE4%u7F29%u5199%uFF0C%u7528%20%3Ccode%3E%3A%3C/code%3E%20%u8868%u793A%20%3Ccode%3Ev-bind%3A%3C/code%3E%20%uFF0C%u7528%20%3Ccode%3E@%3C/code%3E%20%u8868%u793A%20%3Ccode%3Ev-on%3A%3C/code%3E%3C/p%3E%0A%3Cpre%3E%3Ccode%20class%3D%22language-html%22%3E%3Cspan%20class%3D%22hljs-comment%22%3E%26lt%3B%21--%20bad%20--%26gt%3B%3C/span%3E%0A%3Cspan%20class%3D%22hljs-tag%22%3E%26lt%3B%3Cspan%20class%3D%22hljs-name%22%3Einput%3C/span%3E%0A%20%20%3Cspan%20class%3D%22hljs-attr%22%3Ev-bind%3Avalue%3C/span%3E%3D%3Cspan%20class%3D%22hljs-string%22%3E%22value%22%3C/span%3E%0A%20%20%3Cspan%20class%3D%22hljs-attr%22%3Ev-on%3Ainput%3C/span%3E%3D%3Cspan%20class%3D%22hljs-string%22%3E%22onInput%22%3C/span%3E%0A%26gt%3B%3C/span%3E%0A%0A%3Cspan%20class%3D%22hljs-comment%22%3E%26lt%3B%21--%20good%20--%26gt%3B%3C/span%3E%0A%3Cspan%20class%3D%22hljs-tag%22%3E%26lt%3B%3Cspan%20class%3D%22hljs-name%22%3Einput%3C/span%3E%0A%20%20%3Cspan%20class%3D%22hljs-attr%22%3E%3Avalue%3C/span%3E%3D%3Cspan%20class%3D%22hljs-string%22%3E%22value%22%3C/span%3E%0A%20%20@%3Cspan%20class%3D%22hljs-attr%22%3Einput%3C/span%3E%3D%3Cspan%20class%3D%22hljs-string%22%3E%22onInput%22%3C/span%3E%0A%26gt%3B%3C/span%3E%0A%3C/code%3E%3C/pre%3E%0A%3Ch3%3EProps%20%u987A%u5E8F%3C/h3%3E%0A%3Cp%3E%u6807%u7B7E%u7684%20Props%20%u5E94%u8BE5%u6709%u7EDF%u4E00%u7684%u987A%u5E8F%uFF0C%u4F9D%u6B21%u4E3A%u6307%u4EE4%u3001%u5C5E%u6027%u548C%u4E8B%u4EF6%u3002%3C/p%3E%0A%3Cpre%3E%3Ccode%20class%3D%22language-html%22%3E%3Cspan%20class%3D%22hljs-tag%22%3E%26lt%3B%3Cspan%20class%3D%22hljs-name%22%3Emy-component%3C/span%3E%0A%20%20%3Cspan%20class%3D%22hljs-attr%22%3Ev-if%3C/span%3E%3D%3Cspan%20class%3D%22hljs-string%22%3E%22if%22%3C/span%3E%0A%20%20%3Cspan%20class%3D%22hljs-attr%22%3Ev-show%3C/span%3E%3D%3Cspan%20class%3D%22hljs-string%22%3E%22show%22%3C/span%3E%0A%20%20%3Cspan%20class%3D%22hljs-attr%22%3Ev-model%3C/span%3E%3D%3Cspan%20class%3D%22hljs-string%22%3E%22value%22%3C/span%3E%0A%20%20%3Cspan%20class%3D%22hljs-attr%22%3Eref%3C/span%3E%3D%3Cspan%20class%3D%22hljs-string%22%3E%22ref%22%3C/span%3E%0A%20%20%3Cspan%20class%3D%22hljs-attr%22%3E%3Akey%3C/span%3E%3D%3Cspan%20class%3D%22hljs-string%22%3E%22key%22%3C/span%3E%0A%20%20%3Cspan%20class%3D%22hljs-attr%22%3E%3Atext%3C/span%3E%3D%3Cspan%20class%3D%22hljs-string%22%3E%22text%22%3C/span%3E%0A%20%20@%3Cspan%20class%3D%22hljs-attr%22%3Einput%3C/span%3E%3D%3Cspan%20class%3D%22hljs-string%22%3E%22onInput%22%3C/span%3E%0A%20%20@%3Cspan%20class%3D%22hljs-attr%22%3Echange%3C/span%3E%3D%3Cspan%20class%3D%22hljs-string%22%3E%22onChange%22%3C/span%3E%0A/%26gt%3B%3C/span%3E%0A%3C/code%3E%3C/pre%3E%0A%3Ch3%3E%u7EC4%u4EF6%u9009%u9879%u7684%u987A%u5E8F%3C/h3%3E%0A%3Cp%3E%u7EC4%u4EF6%u9009%u9879%u5E94%u8BE5%u6709%u7EDF%u4E00%u7684%u987A%u5E8F%u3002%3C/p%3E%0A%3Cpre%3E%3Ccode%20class%3D%22language-js%22%3E%3Cspan%20class%3D%22hljs-keyword%22%3Eexport%3C/span%3E%20%3Cspan%20class%3D%22hljs-keyword%22%3Edefault%3C/span%3E%20%7B%0A%20%20%3Cspan%20class%3D%22hljs-attr%22%3Ename%3C/span%3E%3A%20%3Cspan%20class%3D%22hljs-string%22%3E%27%27%3C/span%3E%2C%0A%0A%20%20%3Cspan%20class%3D%22hljs-attr%22%3Emixins%3C/span%3E%3A%20%5B%5D%2C%0A%0A%20%20%3Cspan%20class%3D%22hljs-attr%22%3Ecomponents%3C/span%3E%3A%20%7B%7D%2C%0A%0A%20%20%3Cspan%20class%3D%22hljs-attr%22%3Eprops%3C/span%3E%3A%20%7B%7D%2C%0A%0A%20%20data%28%29%20%7B%7D%2C%0A%0A%20%20%3Cspan%20class%3D%22hljs-attr%22%3Ecomputed%3C/span%3E%3A%20%7B%7D%2C%0A%0A%20%20%3Cspan%20class%3D%22hljs-attr%22%3Ewatch%3C/span%3E%3A%20%7B%7D%2C%0A%0A%20%20created%28%29%20%7B%7D%2C%0A%0A%20%20mounted%28%29%20%7B%7D%2C%0A%0A%20%20destroyed%28%29%20%7B%7D%2C%0A%0A%20%20%3Cspan%20class%3D%22hljs-attr%22%3Emethods%3C/span%3E%3A%20%7B%7D%0A%7D%3B%0A%3C/code%3E%3C/pre%3E%0A%3Ch3%3E%u7EC4%u4EF6%u9009%u9879%u4E2D%u7684%u7A7A%u884C%3C/h3%3E%0A%3Cp%3E%u7EC4%u4EF6%u9009%u9879%u8F83%u591A%u65F6%uFF0C%u5EFA%u8BAE%u5728%u5C5E%u6027%u4E4B%u95F4%u6DFB%u52A0%u7A7A%u884C%u3002%3C/p%3E%0A%3Cpre%3E%3Ccode%20class%3D%22language-js%22%3E%3Cspan%20class%3D%22hljs-keyword%22%3Eexport%3C/span%3E%20%3Cspan%20class%3D%22hljs-keyword%22%3Edefault%3C/span%3E%20%7B%0A%20%20%3Cspan%20class%3D%22hljs-attr%22%3Ecomputed%3C/span%3E%3A%20%7B%0A%20%20%20%20formattedValue%28%29%20%7B%0A%20%20%20%20%20%20%3Cspan%20class%3D%22hljs-comment%22%3E//%20...%3C/span%3E%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20styles%28%29%20%7B%0A%20%20%20%20%20%20%3Cspan%20class%3D%22hljs-comment%22%3E//%20...%3C/span%3E%0A%20%20%20%20%7D%0A%20%20%7D%2C%0A%0A%20%20%3Cspan%20class%3D%22hljs-attr%22%3Emethods%3C/span%3E%3A%20%7B%0A%20%20%20%20onInput%28%29%20%7B%0A%20%20%20%20%20%20%3Cspan%20class%3D%22hljs-comment%22%3E//%20...%3C/span%3E%0A%20%20%20%20%7D%2C%0A%0A%20%20%20%20onChange%28%29%20%7B%0A%20%20%20%20%20%20%3Cspan%20class%3D%22hljs-comment%22%3E//%20...%3C/span%3E%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D%3B%0A%3C/code%3E%3C/pre%3E%0A%3Ch3%3E%u5355%u6587%u4EF6%u7EC4%u4EF6%u9876%u7EA7%u6807%u7B7E%u7684%u987A%u5E8F%3C/h3%3E%0A%3Cp%3E%u5355%u6587%u4EF6%u7EC4%u4EF6%u5E94%u8BE5%u603B%u662F%u8BA9%u9876%u7EA7%u6807%u7B7E%u7684%u987A%u5E8F%u4FDD%u6301%u4E00%u81F4%uFF0C%u4E14%u6807%u7B7E%u4E4B%u95F4%u7559%u6709%u7A7A%u884C%u3002%3C/p%3E%0A%3Cpre%3E%3Ccode%20class%3D%22language-html%22%3E%3Cspan%20class%3D%22hljs-tag%22%3E%26lt%3B%3Cspan%20class%3D%22hljs-name%22%3Etemplate%3C/span%3E%26gt%3B%3C/span%3E%0A...%0A%3Cspan%20class%3D%22hljs-tag%22%3E%26lt%3B/%3Cspan%20class%3D%22hljs-name%22%3Etemplate%3C/span%3E%26gt%3B%3C/span%3E%0A%0A%3Cspan%20class%3D%22hljs-tag%22%3E%26lt%3B%3Cspan%20class%3D%22hljs-name%22%3Escript%3C/span%3E%26gt%3B%3C/span%3E%3Cspan%20class%3D%22actionscript%22%3E%0A%3Cspan%20class%3D%22hljs-comment%22%3E/*%20...%20*/%3C/span%3E%0A%3C/span%3E%3Cspan%20class%3D%22hljs-tag%22%3E%26lt%3B/%3Cspan%20class%3D%22hljs-name%22%3Escript%3C/span%3E%26gt%3B%3C/span%3E%0A%0A%3Cspan%20class%3D%22hljs-tag%22%3E%26lt%3B%3Cspan%20class%3D%22hljs-name%22%3Estyle%3C/span%3E%26gt%3B%3C/span%3E%3Cspan%20class%3D%22css%22%3E%0A%3Cspan%20class%3D%22hljs-comment%22%3E/*%20...%20*/%3C/span%3E%0A%3C/span%3E%3Cspan%20class%3D%22hljs-tag%22%3E%26lt%3B/%3Cspan%20class%3D%22hljs-name%22%3Estyle%3C/span%3E%26gt%3B%3C/span%3E%0A%3C/code%3E%3C/pre%3E%0A")}},u=E(7),n=Object(u.a)(C,function(){this.$createElement;this._self._c;return this._m(0)},[function(){var s=this.$createElement;return(this._self._c||s)("section",{domProps:{innerHTML:this._s(this.content)}})}],!1,null,null,null);a.default=n.exports}}]); |